package main

import (
	"fmt"
)

//	func test(x int) {
//		fmt.Printf("%T\n", x)
//	}
func main() {
	//test(100)
	//min(1, 2)

	//const a = "Vic" //類型推導
	//const a, b int = 1, 2
	//var a, b int = 1, 2
	//t := a
	//a = b
	//b = t

	//fmt.Println(a, b)
	//a, b = b, a //特殊寫法
	//fmt.Println(a, b)
	//TODO 待完成功能
	//const a = iota
	//const b = iota
	//const c = iota
	/*
		const (
			_ = 1
			m
			a = iota // 右邊3個計算公式一致，下一行如果省略表示和前面的公一致
			b        //b = iota
			c        //c = iota
			_
			d = iota
			e = 100
			f
		)
		fmt.Println(a, b, c, d, e, f, m)

		const (
			_   = 1 // iota 0
			Jan = iota
			Feb
			Mar
			Apr
			May
			Jun
			Jul
			Aug
			Sep
			Oct
			Nov
			Dec
		)

		fmt.Println(Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)
	*/
	// var a = 1
	// var b = 2.1
	// fmt.Printf("%T, %[1]v\n", a, b)
	// //fmt.Println(a + b)
	// fmt.Println(1 + 2.1)
	// //fmt.Printf("%T %v\n", 1+2.1)
	// var a = 20
	// b := 30
	// var c int = 40

	// fmt.Printf("%T, %T, %T, %d\n", a, b, c, a+b+c)

	// t := 2.1
	// fmt.Printf("1 %f\n", t)
	// fmt.Printf("2 %.2f\n", t)
	// fmt.Printf("3 %3f\n", t)
	// fmt.Printf("4 |%10f|\n", t)
	// fmt.Printf("5 |%-10f|\n", t)
	// fmt.Printf("6 |%1f|\n", t)
	// fmt.Printf("7 %3.2f\n", t)
	// fmt.Println(math.MaxFloat64, math.MaxFloat32, math.MaxInt64, math.MaxInt,
	// 	math.MaxUint8, math.MaxInt8)

	// var s1 = "ab"
	// var s2 = "cd"

	//fmt.Println(`ab` + `cd`)
	var t = 'a' // rune int32 4 bytes 97 0x61
	fmt.Printf("%T %[1]c %[1]q %[1]d\n", t)
	var f = 23343223432338.314159823333
	fmt.Printf("%e %[1]g\n", f)
	d := fmt.Sprintf("%e", f)

	d = fmt.Sprintln("abc\nmn%c", '\n')
	fmt.Printf("%T %[1]q", d)
	d = fmt.Sprintln("abc\nmn%s", "\n")
	fmt.Printf("%T %[1]q", d)
}
